package com.luckyframe.project.jmeter.jmeterTestCase.domain;

import com.luckyframe.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * jmeter测试用例表 jmeter_test_case
 * 
 * @author lancelot
 * @date 2020-09-21
 */
public class JmeterTestCase extends BaseEntity
{
	private static final long serialVersionUID = 1L;
	
	/**  */
	private Long id;
	/** 计划 */
	private String caseName;
	/** threads_num */
	private Integer threadsNum;
	/** threads_delay */
	private Integer threadsDelay;
	/** start_user_count */
	private Integer startUserCount;
	/** start_user_burst */
	private Integer startUserBurst;
	/** stop_user_period */
	private Integer startUserPeriod;
	/** stop_user_count */
	private Integer stopUserCount;
	/** stop_user_period */
	private Integer stopUserPeriod;
	/** flight_time */
	private Integer flightTime;
	/** ramp_up */
	private Integer rampUp;
	/** -1 未上传 1 上传成功，0 上传失败 */
	private Integer scriptStatus;
	/** jmx脚本名称 */
	private String scriptName;
	/** jmx脚本地址 */
	private String scriptLocation;
	/** 分配的客户端id 英文逗号拼接 */
	private String nodeIds;

	private List<String> nodeIdList;

	/** 前置测试用例id */
	private Long prevCaseId;

	private Long relProjectId;
	/** 项目名称 */
	private String relProjectName;
	/** 测试场景：基准测试 负载测试 压力测试 容量测试 */
	private String scenario;
	/** 测试目的 */
	private String testPurpose;
	/** 模块id */
	private Long relModuleId;
	/** 模块名称 */
	private String relModuleName;
	/** 接口名称 */
	private String interfaceName;


	private JmeterTestCase prevCase;

	private List<DependencyFile> dependencyFiles=new ArrayList<>();

	//json string of dependencyFiles
	private String additionFiles;


	private List<DependencyFile> addtionFilesList=new ArrayList<>();

	/** 创建时间 */
	private Date addTime;
	/** 提交用户名称 */
	private String addBy;
	/** 修改时间 */
	private Date updateTime;
	/** 修改用户名称 */
	private String updateBy;

	public List<DependencyFile> getAddtionFilesList() {
		return addtionFilesList;
	}

	public void setAddtionFilesList(List<DependencyFile> addtionFilesList) {
		this.addtionFilesList = addtionFilesList;
	}

	public Long getRelProjectId() {
		return relProjectId;
	}

	public void setRelProjectId(Long relProjectId) {
		this.relProjectId = relProjectId;
	}

	public String getRelProjectName() {
		return relProjectName;
	}

	public void setRelProjectName(String relProjectName) {
		this.relProjectName = relProjectName;
	}

	public String getScenario() {
		return scenario;
	}

	public void setScenario(String scenario) {
		this.scenario = scenario;
	}

	public String getTestPurpose() {
		return testPurpose;
	}

	public void setTestPurpose(String testPurpose) {
		this.testPurpose = testPurpose;
	}

	public Long getRelModuleId() {
		return relModuleId;
	}

	public void setRelModuleId(Long relModuleId) {
		this.relModuleId = relModuleId;
	}

	public String getRelModuleName() {
		return relModuleName;
	}

	public void setRelModuleName(String relModuleName) {
		this.relModuleName = relModuleName;
	}

	public String getInterfaceName() {
		return interfaceName;
	}

	public void setInterfaceName(String interfaceName) {
		this.interfaceName = interfaceName;
	}

	public List<String> getNodeIdList() {
		return nodeIdList;
	}

	public void setNodeIdList(List<String> nodeIdList) {
		this.nodeIdList = nodeIdList;
	}

	public JmeterTestCase getPrevCase() {
		return prevCase;
	}

	public void setPrevCase(JmeterTestCase prevCase) {
		this.prevCase = prevCase;
	}

	public String getAdditionFiles() {
		return additionFiles;
	}

	public void setAdditionFiles(String additionFiles) {
		this.additionFiles = additionFiles;
	}

	public List<DependencyFile> getDependencyFiles() {
		return dependencyFiles;
	}

	public void setDependencyFiles(List<DependencyFile> dependencyFiles) {
		this.dependencyFiles = dependencyFiles;
	}

	public void setId(Long id)
	{
		this.id = id;
	}

	public Long getId() 
	{
		return id;
	}
	public void setCaseName(String caseName) 
	{
		this.caseName = caseName;
	}

	public String getCaseName() 
	{
		return caseName;
	}
	public void setThreadsNum(Integer threadsNum) 
	{
		this.threadsNum = threadsNum;
	}

	public Integer getThreadsNum() 
	{
		return threadsNum;
	}
	public void setThreadsDelay(Integer threadsDelay) 
	{
		this.threadsDelay = threadsDelay;
	}

	public Integer getThreadsDelay() 
	{
		return threadsDelay;
	}
	public void setStartUserCount(Integer startUserCount) 
	{
		this.startUserCount = startUserCount;
	}

	public Integer getStartUserCount() 
	{
		return startUserCount;
	}
	public void setStartUserBurst(Integer startUserBurst) 
	{
		this.startUserBurst = startUserBurst;
	}

	public Integer getStartUserBurst() 
	{
		return startUserBurst;
	}
	public void setStartUserPeriod(Integer startUserPeriod) 
	{
		this.startUserPeriod = startUserPeriod;
	}

	public Integer getStartUserPeriod() 
	{
		return startUserPeriod;
	}
	public void setStopUserCount(Integer stopUserCount) 
	{
		this.stopUserCount = stopUserCount;
	}

	public Integer getStopUserCount() 
	{
		return stopUserCount;
	}
	public void setStopUserPeriod(Integer stopUserPeriod) 
	{
		this.stopUserPeriod = stopUserPeriod;
	}

	public Integer getStopUserPeriod() 
	{
		return stopUserPeriod;
	}
	public void setFlightTime(Integer flightTime) 
	{
		this.flightTime = flightTime;
	}

	public Integer getFlightTime() 
	{
		return flightTime;
	}
	public void setRampUp(Integer rampUp) 
	{
		this.rampUp = rampUp;
	}

	public Integer getRampUp() 
	{
		return rampUp;
	}
	public void setScriptStatus(Integer scriptStatus) 
	{
		this.scriptStatus = scriptStatus;
	}

	public Integer getScriptStatus() 
	{
		return scriptStatus;
	}
	public void setScriptName(String scriptName) 
	{
		this.scriptName = scriptName;
	}

	public String getScriptName() 
	{
		return scriptName;
	}
	public void setScriptLocation(String scriptLocation) 
	{
		this.scriptLocation = scriptLocation;
	}

	public String getScriptLocation() 
	{
		return scriptLocation;
	}
	public void setNodeIds(String nodeIds) 
	{
		this.nodeIds = nodeIds;
	}

	public String getNodeIds() 
	{
		return nodeIds;
	}
	public void setPrevCaseId(Long prevCaseId)
	{
		this.prevCaseId = prevCaseId;
	}

	public Long getPrevCaseId()
	{
		return prevCaseId;
	}
	public void setAddTime(Date addTime) 
	{
		this.addTime = addTime;
	}

	public Date getAddTime() 
	{
		return addTime;
	}
	public void setAddBy(String addBy) 
	{
		this.addBy = addBy;
	}

	public String getAddBy() 
	{
		return addBy;
	}
	public void setUpdateTime(Date updateTime) 
	{
		this.updateTime = updateTime;
	}

	public Date getUpdateTime() 
	{
		return updateTime;
	}
	public void setUpdateBy(String updateBy)
	{
		this.updateBy = updateBy;
	}

	public String getUpdateBy()
	{
		return updateBy;
	}

    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("caseName", getCaseName())
            .append("threadsNum", getThreadsNum())
            .append("threadsDelay", getThreadsDelay())
            .append("startUserCount", getStartUserCount())
            .append("startUserBurst", getStartUserBurst())
            .append("startUserPeriod", getStartUserPeriod())
            .append("stopUserCount", getStopUserCount())
            .append("stopUserPeriod", getStopUserPeriod())
            .append("flightTime", getFlightTime())
            .append("rampUp", getRampUp())
            .append("scriptStatus", getScriptStatus())
            .append("scriptName", getScriptName())
            .append("scriptLocation", getScriptLocation())
            .append("nodeIds", getNodeIds())
            .append("prevCaseId", getPrevCaseId())
            .append("addTime", getAddTime())
            .append("addBy", getAddBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .toString();
    }
}
